//
//  CCRetainCount.h
//  CCFC_IPHONE
//
//  Created by  xuchen(陈旭)， xichen(陈曦)， qq：511272827 on 10-10-28.
//  Copyright 2010 cc_team. All rights reserved.
//
#ifndef	CC_RETAIN_COUNT
#define	CC_RETAIN_COUNT

#include "CCAll.h"
#include "CCCommon.h"

#ifdef	__OBJC__

//日志输出对象引用计数的值
#ifndef __OPTIMIZE__ 
#define SHOW_RETAIN_COUNT(obj)				NSLog(@"retainCount is: %d", [(obj) retainCount])
#define SHOW_RETAIN_COUNT_EX(obj, objStr)	NSLog(@"%@'s retainCount is: %d", objStr, [(obj) retainCount])
#else
#define SHOW_RETAIN_COUNT(obj)				DO_NOTHING
#define SHOW_RETAIN_COUNT_EX(obj, objStr)	DO_NOTHING
#endif

//获取对象引用计数的值
#define	GET_RETAIN_COUNT(obj)				[(obj) retainCount]

#endif

#endif

